/**
 * Created by bgy on 2016/12/21.
 */
import React from 'react';
import {Link} from 'react-router';

import HeaderTitle from '../../components/common/HeaderTitle';

var messages = [
  {id: '1', 'topic': '您已获得质检报告', content: '您与xx年xx月xx日，申请送检的大幅发送到发送到发送到发达', time: '2016-12-21 17:52:53'},
  {id: '2', 'topic': '您已获得质检报告', content: '您与xx年xx月xx日，申请送检的大幅发送到发送到发送到发达', time: '2016-12-21 17:52:53'}
]

var MessageCenter = React.createClass({
  render: function () {
    const mList = messages.map((m)=>
      <div className="messageDiv" key={m.id}>
        <time>{m.time}</time>
        <div className="messageContent">
          <h2>{m.topic}</h2>
          <p>
            {m.content}
          </p>
          <hr/>
          <Link className="toDetailPage" to="">查看详情</Link>
        </div>
      </div>
    );
    return (
      <div className="main-bgc">
        <HeaderTitle title='消息中心'/>
        {mList}
      </div>
    );
  }

})
export default MessageCenter;
